package cn.com.demo.microservice.anquan.controller;

import cn.com.demo.microservice.anquan.service.IAccountService;
import cn.com.demo.microservice.entity.AqAccount;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/account")
public class AccountController {
    @Autowired
    private IAccountService accountService;
    @GetMapping("/search/{code}")
    public AqAccount searchAccountByCode(@PathVariable("code") String code){
        AqAccount account = this.accountService.searchByCode(code);
        return account;
    }
}
